Fixed layout electronic publications

ABSTRACT

According to some embodiments, techniques are described herein to assist a publisher to create fixed layout pages of an electronic publication. The techniques are useful for creating cookbooks, travel books, photography books, children&#39;s books, other “illustrated books”, or any other electronic publication where a fixed layout for at least some of the pages of the electronic publication is desirable. With the techniques, the publisher may embed fonts, select particular fonts and font sizes, assign visual content to fixed layout pages, and precisely position visual content at fixed positions on fixed layout pages. A scaling mechanism for an electronic reader device is also disclosed for scaling fixed layout pages to fit the size of a display screen of the reader device while maintaining the aspect ratio and assignment of visual content to fixed layout pages specified by the publisher.

BACKGROUND

The present invention relates generally to electronic publishing, andmore particularly, to publishing and rendering an electronic publicationin a fixed layout.

Today, the world of electronic publications enjoys increasing consumerawareness spurred by the recent availability of consumer electronicreader devices, or e-reader devices, such as those commerciallyavailable from well-known companies such as Apple, Barnes and Noble, andSony. Electronic publishing data format standards have been developedand are being developed to provide publishers with a standardized set ofrules and instructions for publishing electronic publications fordifferent e-reader device platforms. An example of such a standard isthe Electronic Publication (EPUB) standard developed by theInternational Digital Publishing Forum (IDPF). A current release of theePub standard, 2.0.1, is available online at www.idpf.org.

Current electronic publishing data format standards are designed forre-flowable content and do not inherently support fixed layouts. Thismeans that e-reader devices following these standards move visualcontent (e.g., text and images) from one page to another as necessary tofit visual content to the size of the e-reader device display screen andaccording user preferences. For example, current standards allow usersto change the font or font size of text to suit their preferences. Asthe font or font size changes, an e-reader device may re-flow text asnecessary so that the width of a line of text is no longer than thewidth of the screen thereby preventing the user from having to scroll orpan horizontally to read lines of the book. This may also result invisual content on a page re-flowing to the previous or next page orvisual content on the previous or next pages re-flowing to a currentlydisplayed page. Further, to mimic the behavior of actual physical books,many e-reader devices present visual content on pages that are displayedentirely on the screen of the e-reader device so that the user is notrequired to scroll or pan vertically when reading. As a result, if thefont or font size is changed by the user, visual content initially onone page may re-flow to another page.

The re-flowable behavior of current standards and current e-readerdevices is generally acceptable to publishers when the electronicpublication consists largely of text with few or no images or imagesthat are to be presented inline within text. However, some publishersmay wish to publish an electronic publication in which the layout ofvisual content is fixed on pages and does not re-flow inter-page.Cookbooks, travel books, photography books, children's books, and otherimage intensive books are examples of types of electronic publicationswhere a fixed layout may be desirable.

One possible solution to creating a fixed layout electronic publicationis to capture or create a digital image of each entire page. An e-readerdevice may then display each image to the reader. However, this solutionis less than optimal because the text of the page captured in an imagetypically would not be available as text data to useful text-basedcapabilities of many e-reader devices such as searching, bookmarking,highlighting and passage sharing. Further, if the dimensions of an imageare not proportional to the dimensions e-reader device display, thee-reader device may split the image over multiple pages resulting in anunappealing presentation of the publication.

Based on the foregoing, it is clearly desirable to help publisherscreate fixed layout electronic publications in which a fixedrelationship between visual content and pages may be maintained ine-reader device displays and in which text content is available to thee-reader devices as text data. The present invention fulfills these andother needs.

BRIEF DESCRIPTION OF THE DRAWING(S)

FIG. 1 shows a block diagram of a sample e-reader device in which someembodiments of the invention may be implemented.

FIG. 2 shows a hierarchical file system view of an example electronicpublication according to some embodiments of the invention.

FIG. 3 shows a flowchart of a sample rendering operation according tosome embodiments of the invention.

FIG. 4 shows a flowchart of a sample scaling operation according to someembodiments of the invention.

DETAILED DESCRIPTION Glossary

As used herein, the term “electronic reader device”, or just “e-readerdevice”, refers to a physical platform (hardware and software) on whichelectronic publications are rendered. Non-limiting examples of e-readerdevices include desktop computers, laptop computers, tablet computers,mobile/smart phones, dedicated e-reader devices, or any other computingdevice capable of or configured for rending electronic publications.

As used herein, the term “publisher”, unless otherwise indicated, refersto any human creator of an electronic publication. For example, thepublisher may be the copyright owner of the content of the publicationor an agent creating the publication on behalf of the copyright owner.

As used herein, the term “reader”, unless otherwise indicated, means ahuman user of an e-reader device.

In the following description, the term “visual content” broadly refersto any type of content that may be displayed as part of an electronicpublication on a display screen of an e-reader device, including but notlimited to text and images.

General Overview

According to some embodiments, techniques are described herein to assista publisher to create fixed layout pages of an electronic publication.The techniques are useful for creating cookbooks, travel books,photography books, children's books, other “illustrated books”, or anyother electronic publication where a fixed layout for at least some ofthe pages of the electronic publication is desirable. With thetechniques, the publisher may embed fonts, select particular fonts andfont sizes, assign visual content to fixed layout pages, and preciselyposition visual content at fixed positions on fixed layout pages.

As used herein, the term “fixed layout electronic publication” means anelectronic publication having at least one fixed layout page.

As used herein, the term “fixed layout page” means a single page or atwo-page spread of an electronic publication in which visual contentassigned to the page or the two-page spread does not re-flow betweenpages. A two-page spread is two consecutive facing pages of anelectronic publication displayed side-by-side. Unless otherwiseindicated or apparent from context, where “fixed layout page” is recitedin the following description, either “single page fixed layout page” or“two-page spread fixed layout page” may be substituted instead. Thus, inthe following description, unless otherwise indicated or apparent fromcontext, description related to a fixed layout page applies to both asingle page fixed layout page and a two-page spread fixed layout page.

According to some embodiments, an e-reader device prevents a reader fromchanging the font or the font size of text of a fixed layout pagepresented to the reader, thereby preserving the font and font sizeselections of the publisher. In some embodiments, if the reader zooms ormagnifies a fixed layout page, the e-reader device does not re-flowvisual content assigned to the fixed layout page by the publisher,thereby preserving the fixed layout choices of the publisher.

In accordance with some embodiments of the present invention, arendering mechanism for e-reader devices is provided for automaticallyscaling and rendering a fixed layout page to fit an e-reader devicedisplay screen size based, at least in part, upon page size informationassociated with the fixed layout page. In some embodiments, the pagesize information is specified by the publisher when authoring theelectronic publication. In some embodiments, the page size informationincludes a page aspect ratio and page dimensions (e.g., width and heightin pixels). In this case where only both a page aspect ratio and pagedimensions are specified, the aspect ratio of the page dimensions shouldbe the same or substantially the same as the page aspect ratio. In otherembodiments, the page size information includes just page dimensions andthe page aspect ratio is calculated from the page dimensions. Therendering mechanism relieves the publisher from having to createmultiple fixed layout pages for different e-reader devices havingdifferent display device sizes. With the techniques, the publisher cancreate a single fixed layout page that can be viewed in a fixed layouton all of, for example, a desktop computer, a tablet computer, and amobile phone.

In some embodiments where the page size of a fixed layout page accordingto associated page size information is larger in at least one dimension(e.g., width or height) than the display screen of an e-reader device,the rendering mechanism scales the fixed layout page, including thevisual content assigned to the page by the publisher, so that the fixedlayout page and the assigned visual content fit entirely on the displayscreen. When scaling, the rendering mechanism maintains or substantiallymaintains the page aspect ratio and fixed layout of the fixed layoutpage specified by the publisher. Thus, the techniques allow a publisherto select a page aspect ratio and a fixed layout for the fixed layoutpage that the publisher deems is best suited for the visual content ofthe fixed layout page and the page aspect ratio and fixed layout will bemaintained or substantially maintained by the rendering mechanism whenthe fixed layout page is displayed by the e-reader device.

For example, with the techniques, a publisher can create a book in whicha fixed layout page is wider than taller and is filled with an image andwhere text on the fixed layout page is layered on the image at a fixedlocation relative to the fixed layout page. According to someembodiments, the rendering mechanism will scale the size of fixed layoutpage, the size of the image, and the size and position of the text asnecessary to fit the size of the e-reader display screen, maintaining orsubstantially maintaining the page aspect ratio and the fixed positionof the text relative to the scaled fixed layout page.

According to some embodiments, the rendering mechanism automaticallyscales a fixed layout page of an electronic publication in the followingmanner. Initially, the rendering mechanism obtains a content documentauthored by the publisher representing the fixed layout page. Thecontent document is associated with or includes page size information.The content document includes or references the visual content to bedisplayed on the fixed layout page. In some embodiments, the contentdocument is a HyperText Markup Language (HTML) formatted or aneXtensible HyperText Markup Language (XHTML) formatted document.Optionally, the content document includes or references instructions forprecisely positioning the visual content at fixed locations on the fixedlayout page. In some embodiments, a Cascading Style Sheet (CSS) is usedfor precise positioning. The CSS may be internal or external to thecontent document.

After obtaining the page size information, the rendering mechanism thenselects a first page dimension and a target size for the first pagedimension based, at least in part, upon the page aspect ratio and thedimensions of the e-reader device display screen. The first pagedimension is selected by the rendering mechanism as either width orheight such that the fixed layout page, when scaled to fit entirely onthe display screen, maintains or substantially maintains the page aspectratio.

In some embodiments, which of the width and height dimensions isselected by the rendering mechanism as the first page dimension dependson a difference, if any, between the page aspect ratio and the aspectratio of the display screen. For example, if the page aspect ratio islarger than the screen aspect ratio and the page width is greater thanthe width of the display screen, then the rendering mechanism may selecta target width for the fixed layout page such that the fixed layoutpage, when scaled for display by the rendering mechanism, fits entirelyon the display screen while maintaining or substantially maintaining thepage aspect ratio. On the other hand, if the page aspect ratio issmaller than the screen aspect ratio and the page height is greater thanthe height of the display screen, then the rendering mechanism selects atarget height such that the fixed layout page, when scaled for display,may be displayed entirely on the display screen. If the page dimensionsare such that the page size is smaller than the size of the displayscreen in both width and height, the rendering mechanism may not performany scaling of the fixed layout page.

In some embodiments, the rendering mechanism selects a target size forthe first page dimension that is as large or nearly as large as possiblegiven the size constraints of the display screen and so that the fixedlayout page is displayed entirely on the display screen while leavingroom for other elements that may consume screen real estate such as, forexample, another fixed layout page, if the fixed layout page is a singlepage fixed layout page being displayed as part of a two-page spread;toolbars, borders for fake pages and fake bindings; a small slice of thefacing page; etc.

In some embodiments, the rendering mechanism is also capable of scalingvisual content assigned to a fixed layout page. The visual content isscaled such that the visual content remains on the fixed layout page towhich it was assigned by the publisher. In other words, the renderingmechanism does not re-flow the visual content between pages. To do so,in some embodiments, the rendering mechanism calculates a width-wisescaling factor and a height-wise scaling factor based on the pagedimensions indicated by the associated page size information and thedimensions of the fixed layout page as scaled for display by therendering mechanism. The positions and sizes of visual content assignedto the fixed layout page may then be scaled by the rendering mechanismbased on the calculated scaling factors to proportionally fit thedimensions of the scaled fixed layout page.

Scaling Example

As example of scaling a fixed layout page of an electronic publication,assume the publisher has specified the dimensions of the fixed layoutpage as 2000 pixels wide and 2800 pixels high. Thus, the page aspectratio is 2000 pixels/2800 pixels. In addition, assume the publisher haspositioned the top-left corner of an image 1000 pixels wide and 1400pixels high at 200 pixels from the left border of the fixed layout pageand 400 pixels down from the top border of the fixed layout page. Nowassume the rendering mechanism selects a scaled page width of 670 pixelsbased on a screen size that is 768 pixels wide and 1024 pixels high, atypical screen size for handheld tablet computers.

According to some embodiments, the scaled fixed layout page produced bythe rendering mechanism of the present invention may be 670 pixels wideand 938 pixels high. The image may be scaled down to 335 pixels wide and469 pixels high and positioned on the scaled fixed layout page so thatthe top left corner of the image is 67 pixels from the left border and134 pixels from the top border of the scaled page.

Note that in this example, the aspect ratio of the scaled fixed layoutpage (670/938) is the same as the publisher-specified page aspect ratio(2000/2800). Further note that scaled image consumes the same percentagearea of the scaled fixed layout page as the originally sized imageconsumed of the published-specified page size. Also note that theposition of the scaled image on the scaled fixed layout page isproportional to the position of the original image on thepublisher-specified fixed layout page. Thus, in this example, the pageaspect ratio and the fixed layout of the fixed layout page specified bythe publisher are maintained by the rendering mechanism when scaling thefixed layout page to fit the size of the display screen.

Sample E-Reader Device

With reference to FIG. 1, there is shown a block diagram of a samplee-reader device 100 in which some embodiments of the present inventionmay be implemented. Device 100 may be a desktop computing device, alaptop computing device, a tablet computing device, a smart phone, adedicated electronic reading device, or the like. As shown, device 100includes a bus 102 for facilitating information exchange, and one ormore processors 104 coupled to bus 102 for executing instructions andprocessing information. Device 100 also includes one or more storage(s)106 (also referred to herein as computer readable storage media) coupledto the bus 102. Storage(s) 106 may be used to store executable programs,permanent data, temporary data that is generated during programexecution, and any other information needed to carry out computerprocessing.

Storage(s) 106 may include any and all types of storages that may beused to carry out computer processing. For example, storage(s) 106 mayinclude main memory (e.g. random access memory (RAM) or other dynamicstorage device), cache memory, read only memory (ROM), permanent storage(e.g. one or more magnetic disks or optical disks, flash storage, etc.),as well as other types of storage. The various storages 106 may bevolatile or non-volatile. Common forms of computer readable storagemedia include, for example, a floppy disk, a flexible disk, hard disk,magnetic tape, or any other magnetic medium, a CD-ROM, DVD, or any otheroptical storage medium, punchcards, papertape, or any other physicalmedium with patterns of holes, a RAM, a PROM, an EPROM, a FLASH-EPROM orany other type of flash memory, any memory chip or cartridge, and anyother storage medium from which a computer can read.

As shown in FIG. 1, storage(s) 106 store at least several sets ofexecutable instructions, including an operating system 114 and anapplication 112. The processor(s) 102 execute the operating system 114to provide a platform on which other sets of software may operate, andexecute the application 112 to provide additional, specificfunctionality. For purposes of the present invention, the application112 may be any type of application that renders electronic publicationson a screen of display device 116.

In some embodiments, the functionality described herein is provided atleast in part by the application 112. The application 112 may invoke theservices of the operating system 114 to provide some of thefunctionality. For example, when the application 112 has a fixed layoutpage of an electronic publication to scale and render, the application112 may invoke services of the operating system 114 to determinedevice-specific information such as the current aspect ratio, size,dimensions, orientation, etc. of the screen on display device 116. Theapplication 112 may then use the device-specific information to scalethe fixed layout page and the visual content assigned to it. Theapplication 112 may invoke another service of the operating system 114to actually render the scaled fixed layout page and the scaled visualcontent on the screen of the display device 116. As an alternative, theapplication 112 may provide the fixed layout page and the visual contentto the operating system 114, and ask the operating system 114 to scaleand render the fixed layout page and the visual content according toparameters determined by the operating system 114. As an alternative tohaving the operating system 114 provide scaling and renderingfunctionality, the functionality may instead be provided by theapplication 112 itself. As a further alternative, the functionality maybe provided by a combination of or cooperation between the operatingsystem 114 and one or more other applications (not shown). All suchpossible divisions of functionality are within the scope of the presentinvention.

The device 100 further comprises one or more user interface components108 coupled to the bus 102. These components 108 enable the device 100to receive input from and provide output to a user. On the input side,the user interface components 108 may include, for example, akeyboard/keypad having alphanumeric keys, a cursor control device (e.g.mouse, trackball, touchpad, etc.), a touch sensitive screen, amicrophone for receiving audio input, etc. On the output side, thecomponents 108 may include a graphical interface (e.g. a graphics card)and an audio interface (e.g. sound card) for providing visual and audiocontent. The user interface components 108 may further include a displaydevice 116, a set of speakers, etc., for presenting the audio and visualcontent to a user. In one embodiment, the operating system 114 and theapplication 112 executed by the processor(s) 104 may provide a softwareuser interface that takes advantage of and interacts with the userinterface components 108 to receive input from and provide output to auser. This software user interface may, for example, provide a menu thatthe user can navigate using one of the user input devices mentionedabove.

Different devices 100 may have different size display devices 116. Thus,the available screen space for rendering electronic publications on adisplay device 116 may vary from device 100 to device 100. Further, theaspect ratio and the dimensions of the screen of a display device 116may vary from device 100 to device 100. Still further, in portabledevices 100 that rotate the orientation of the screen depending on thephysical orientation of the display device 116, the aspect ratio anddimensions of the screen of a display device 116 may vary depending onwhether the screen is currently in landscape orientation (wider thantaller) or currently in portrait orientation (taller than wider).

In addition to the components set forth above, the device 100 furthercomprises one or more communication interfaces 110 coupled to the bus102. These interfaces 110 enable the device 100 to communicate withother components. The communication interfaces 110 may include, forexample, a network interface (wired or wireless) for enabling the device100 to send messages to and receive messages from a network. Thecommunications interfaces 110 may further include a wireless interface(e.g. Bluetooth) for communicating wirelessly with nearby devices, and awired interface for direct coupling with a compatible local device.Furthermore, the communications interfaces 110 may include a 3Ginterface for enabling the device to access the Internet without using alocal network. These and other interfaces may be included in the device100.

Fixed Layout Electronic Publication

In some embodiments, a fixed layout electronic publication is aspecially constructed compressed file archive. The file archive may bein any suitable compressed file archive format such as, for example, thewidely used .zip format or other format suitable to the requirements athand. The fixed layout publication may contain, among otherconfiguration files, a number of content documents created by thepublisher.

In some embodiments, a fixed layout electronic publication is backwardcompatible with a re-flowable electronic publishing standard such that anon-capable e-reader device that does not support fixed layout featuresof the present invention but does support the re-flowable standard canstill present the electronic publication (but in a reflowable form). Thefixed layout electronic publication may not be presented by thesenon-capable e-readers devices in a fixed layout as intended by thepublisher. Nonetheless, by being backward compatible with the reflowablestandard, the fixed layout publication can still be presented by thesenon-capable e-reader devices in a readable form. In some embodiments,the reflowable standard to which backward compatibility is provided is acurrent version of the Electronic Publication (EPUB) standard as setforth by the International Digital Publishing Forum (IDPF). Backwardcompatibility may be maintained with draft and future versions of theEPUB standard and such versions are contemplated as being within thescope of the invention.

Content Documents

In some embodiments, a content document of a fixed layout electronicpublication represents one of: (1) a fixed layout page (i.e., a singlepage fixed layout page or a two-page spread fixed layout page) or (2)re-flowable content. Each content document of a fixed layout electronicpublication contains or references visual content (e.g., text andimages) of the electronic publication. If a content document representsa fixed layout page, then the visual content of the content documentdoes not re-flow between pages. If the content document representsre-flowable content, then some or all of the visual content of thecontent document may be displayed on a single page and may re-reflowbetween pages. Thus, in some embodiments, the electronic publicationformat of the present invention can be flexibly used by publishers tocreate electronic publication presenting a mix of fixed layout pages andre-flowable content. The electronic publication format can also be usedto create an electronic publication presenting all fixed layout pages.In some embodiments, each content document is formatted according to aweb presentation language such as HyperText Markup Language (HTML) oreXtensible HyperText Markup Language (XHTML).

According to some embodiments, visual content of a content document maybe precisely positioned by the publisher at fixed locations on a fixedlayout page. In some embodiments, visual content is precisely positionedusing a Cascading Style Sheet (CSS). The CSS may be a separate filereferenced from within the content document or the CSS may be includeddirectly in the content document. Thus, the CSS may be considered to bepart of the content document. Example content documents and examples ofusing CSS for precisely positioning visual content on fixed layout pagesare provided below.

Example Electronic Publication

FIG. 2 provides a hierarchical file system view of an example electronicpublication according to some embodiments of the invention. The examplepublication contains two top-level folders “META-INF” and “OEBPS” and a“mimetype” file. The META-INF folder contains the “display-options.xml”and the “container.xml” configuration files. The OEBPS folder containssub-folders “css”, “fonts”, and “images” containing CSS data, font data,and image data respectively. The OEBPS folder also contains contentdocuments “001.xhtml” through “008.xhtml” and configuration files“package.opf” and “toc.ncx”.

The file and folder layout of the example publication of FIG. 2 is basedon a current version of the Open Container Format (OCF) as set forth bythe International Digital Publishing Forum (IDPF) but with extensions tosupport fixed layout electronic publications and other configurationoptions as described herein. Accordingly, the following discussionfocuses primarily on the extensions and the configuration options. Draftand future versions of the OCF as well as other similar electronicpublishing container formats based on the Open eBook PublicationStructure (OEBPS) are contemplated as being within the scope of theinvention and may serve as a basis for the extensions and configurationoptions described herein.

Further, not all files and folder listed in FIG. 2 are required of theinvention. For example, an electronic publication that does not embedany fonts may not include the “fonts” sub-folder. Further, the names ofthe files and folders are largely arbitrary and may vary fromimplementation to implementation according to the requirements at hand.For example, the OEBPS folder is arbitrarily named in the example layoutof FIG. 2. However, in some cases, a particular name for a file orfolder may be used to maintain backward compatibility with a re-flowableelectronic publishing standard. Still further, where separate foldersare shown in FIG. 2, such separation may not be required. For example,images and font data could be stored in the same folder. Still further,other files not listed in FIG. 2 may be included in an electronicpublication. For example, the META-INF folder may contain otherconfiguration files that describe the contents, configuration, metadata,signatures, encryption, rights, and other information about theelectronic publication.

Display-Options.XML Configuration File

In some embodiments, an electronic publication includes a“display-options.xml” configuration file. In some embodiments, thedisplay-options.xml configuration file has a file name of“display-options.xml”. However, this file name is not required of theinvention and other names may be used.

In some embodiments, upon obtaining the electronic publication, ane-reader device, such as device 100, may read and parse thedisplay-options.xml to access the configuration parameters specifiedwithin. The e-reader device may present the electronic publication tothe reader in accordance with the configuration. In some embodiments,the configuration data is formatted in eXtensible Markup Language (XML).

In some embodiments, the display-options.xml configuration file providesa number of configuration options to the publisher for configuring thecontained electronic publication. In some embodiments, thedisplay-options.xml configuration file specifies whether the electronicpublication is to be treated as a fixed layout electronic publication ora re-flowable electronic publication. Other options allow the publisherto fine tune how the electronic publication is displayed on differentdevices and in different situations.

An example display-options.xml file is:

0: <?xml version=“1.0” encoding=“UTF-8”?> 1: <display_options> 2: <platform name=“*”> 3:    <option name=“fixed-layout”>true</option> 4:   <option name=“open-to-spread”>true</option> 5:  </platform> 6: <platform name=“phone”> 7:    <optionname=“orientation-lock”>landscape-only</option> 8:  </platform> 9:</display_options>

For example, at line 3 in the above-example display-options.xmlconfiguration file, the “option” tag with a name of “fixed-layout” andthe value “true” is specified to indicate that the contained electronicpublication is to be treated as fixed layout electronic publication.This means that the e-reader device may, when displaying the electronicpublication, disable certain e-reader device configuration options thatmay not be appropriate for a fixed layout electronic publication such asthe ability to change fonts or font sizes. This also means that thee-reader device will determine, when rendering a content document of theelectronic publication, whether the content document should be renderedas a fixed layout page or as a re-flowable document. In someembodiments, this determination is made based on page size informationassociated with the content document. If the “fixed-layout” option ismissing or the value is other than “true”, then the e-reader devicerenders each content document of the contained publication as are-flowable document, even if the content document is associated withpage size information.

Locking the Screen Orientation

Many of today's e-reader devices are human-portable handheld computerdevices that include a rectangular display device. The e-reader devicestypically include an accelerometer for detecting when the physicalorientation of the display device is no longer aligned with the currentorientation of the screen of the display device. In response todetecting this misalignment, these e-reader devices may rotate thescreen so that the screen orientation is re-aligned with the displaydevice's physical orientation. At a given time, the screen may be in oneof two orientation modes, landscape or portrait. In landscapeorientation mode, the bottom and top of the screen run parallel to thelonger edges of the display device, regardless of the display device'sphysical orientation. In portrait orientation mode, the bottom and topof the screen run parallel to the shorter edges of the display device,regardless of the display device's physical orientation.

With current e-reader devices, a change in the physical orientation ofthe e-reader's display device may result in a change in the orientationof the screen from landscape to portrait or from portrait to landscape.With re-flowable visual content, this change in screen orientationordinarily does not cause presentation problems because the e-readerdevice is able to reflow the visual content as needed to adjust to thenew screen orientation. However, with a fixed layout electronicpublication, visual content of a content document may not re-flow, andthus, a fixed layout page that is readable in one screen orientation maynot be readable or as readable when presented to the reader in the otherscreen orientation. For example, text on a fixed layout page may be morereadable when the fixed layout page is displayed in portrait orientationthan when displayed in landscape orientation, especially if the displaydevice is much taller than wider. As a result, the publisher may wish toprevent the fixed layout page from being displayed in landscapeorientation.

Accordingly, in some embodiments, the display-options.xml configurationfile provides a way for the publisher to lock the screen in a particularorientation regardless of the physical orientation of the e-readerdevice's display device. For example, at line 7 in the above-exampledisplay-options.xml configuration file, the “option” tag with a name“orientation-lock” and the value “landscape-only” is specified toindicate the display screen is always to be displayed in landscapeorientation on the designated e-reader device platforms. Thus, when adesignated e-reader device enters a second physical orientation modefrom a first physical orientation mode that would otherwise cause thee-reader device to rotate the screen display from a first orientation(e.g., landscape) to a second orientation (e.g., portrait), the e-readerdevice maintains the screen display in the first orientation (e.g.,landscape).

In some embodiments, instead of the “landscape-only” value, the“orientation-lock” option may specify the value “portrait-only” toindicate that the display screen is always to be displayed in portraitorientation. In some embodiments, if the “orientation-lock” option isomitted or specified with a value of “none”, then the e-reader device isallowed to rotate the screen between landscape and portrait orientationdepending on the physical orientation of the device.

Controlling the Initial Display

In some embodiments, the display-options.xml file allows the publisherto specify how the contained fixed layout electronic publication shouldinitially be displayed when the reader opens the publication in ane-reader device. In some embodiments, two initial display options areavailable: single-page spread and two-page spread. In a single-pagespread, the screen of the e-reader comprises largely a single page (asmall slice of the facing page and/or other border elements may bevisible). In a two-page spread, the screen presents two consecutivefacing pages side by side. For example, at line 4 in the above-exampledisplay-options.xml configuration file, the “option” tag with a name“open-to-spread” and the value “true” is specified to indicate that thecontained electronic publication is to be initially displayed in atwo-page spread on the designated e-reader device platforms. In someembodiments, a value other than “true”, of if the “open-to-spread”option is omitted, indicates that the contained publication is to beinitially displayed in a single-page spread on the designated e-readerdevice platforms.

A two-page spread may be a more optimal display for certain types offixed layout books such as children's books, picture books, etc. wheretwo consecutive facing pages are often intended by the publisher to bepresented to the reader at the same time. In some embodiments, acombination of the “open-to-spread” and “orientation-lock” options isused to maintain display of a fixed layout publication in a two-pagespread landscape orientation. This combination may be used to provide areading experience similar to reading an actual physical book.

Note that the “open-to-spread” option is independent of whether contentdocuments are treated as fixed layout pages or reflowable content. Forexample, where the “option-to-spread” option is “true”, two consecutivesingle page fixed layout pages corresponding to two consecutive contentdocuments of the publication may be initially displayed, a two-pagespread fixed layout page corresponding to a single content document maybe initially displayed, or two consecutive pages presenting visualcontent from one or more re-flowable content documents may be initiallydisplayed.

Controlling for Different E-Reader Device Platforms

In some embodiments, the display-options.xml configuration file allowsthe publisher to specify configuration options on a per-e-readerplatform basis in addition to or instead of specifying options that areapplicable to all e-reader device platforms. For example, the aboveexample display-options.xml specifies that the contained publication isto be locked to landscape orientation only on “phone” e-reader deviceplatforms as indicated by the “orientation-lock” option tag containedwithin the “phone” platform tag. It also specifies that the containedpublication is to be treated as a fixed layout publication initiallyopened to a two-page spread on all e-reader device platforms asindicated by the “fixed-layout” and “orientation-lock” option tagscontained within the platform tag specifying the name “*”. The asteriskis used to denote that the contained options apply to all e-readerdevice platforms.

Specific e-reader device platforms may be identified in the platform tagusing any convenient notation. When an e-reader device reads adisplay-options.xml file for the purpose of configuring a containedelectronic publication, the e-reader device evaluates the value of the“name” attribute of any “platform” tag in the display-options.xml fileto determine whether the options contained within the platform tag applyto it. The value may identify a particular e-reader device, a group ofe-reader devices, or a class of e-reader devices. The particular syntaxof the value and the range of possible values may vary fromimplementation to implementation according to the requirements at hand.For example, the value “phone” in the above example display-options.xmlis used to identify a class of e-reader devices and each e-reader devicein the class may comprise logic for determining whether they belong tothe class, and hence, whether the configuration options contained withthe “phone” platform tag apply to it. Thus, embodiments of the inventionare not limited to any particular values for the “name” attribute of a“platform” tag.

Layout Viewport

As mentioned, in some embodiments, the publisher may author a contentdocument of an electronic publication in which the visual content of thecontent document has a fixed layout on a fixed layout page. The fixedlayout page has an aspect ratio and initial dimensions (e.g., width andheight in pixels) as set by size information associated with the contentdocument within the publication. This size information may be specifiedby the publisher when authoring the content document. The aspect ratioand initial dimensions set by the size information associated with thecontent document is referred to herein as the content document's “layoutviewport”.

In some embodiments, when a content document is displayed by an e-readerdevice as a fixed layout page, the layout viewport of the contentdocument dictates the aspect ratio of the scaled fixed layout page andthe proportional size of the visual content displayed on the scaledfixed layout page. For example, according to some embodiments of theinvention, if the layout viewport for a content document as set by thepublisher is 1000 pixels wide by 1400 pixels high and the contentdocument references an image that measures 1000 pixels wide by 1400pixels high, then the image will fill the entire scaled fixed layoutpage. However, if the layout viewport is set by the publisher at 2000pixels wide by 2800 pixels high, then that same image will fill onlyhalf of the scaled fixed layout page.

A number of factors may affect the publisher's choice of an aspect ratioand dimensions for the layout viewport including, for example, whetherthe ideal orientation for the corresponding fixed layout page islandscape or portrait, other visual elements that consume screen realestate (toolbars, borders, etc.), whether the ideal viewing spread issingle-page or two-page, etc.

Specifying the Aspect Ratio and Dimensions of the Layout Viewport

Aspect Ratio:

In some embodiments, the publisher specifies the aspect ratio of thelayout viewport for a content document by including, in the electronicpublication, metadata that specifies the aspect ratio of the layoutviewport or from which the aspect ratio may be determined by thee-reader device. According to some embodiments, the aspect ratio of thelayout viewport is specified by the publisher using the HTML or XHTML“<meta>” element within the content document.

In some embodiments, the “<meta”> element is used with a “name”attribute having the value “viewport” and a “content” attribute having avalue of the form “width=X, height=Y”, where X and Y are unit-lessnumerical values indicating the aspect ratio. Other variants forindicating the aspect ratio are possible using the “<meta>” and all suchvariants are within the scope of the present invention. For example, thevalue of the “content” attribute could be a single value expressing theaspect ratio as a number, fraction, or diagonal length of the layoutviewport. The following is an example of an XHTML “<meta>” viewportelement indicating an aspect ratio of 792/612 for the layout viewport:

<meta name=“viewport” content=“width=792, height=612”/>

Dimensions:

In some embodiments, the publisher specifies the dimensions (e.g., widthand height in pixels) of the layout viewport for a content document byincluding, in the electronic publication, metadata that specifies thedimensions of the layout viewport or from which the dimensions may bedetermined by the e-reader device. According to some embodiments, thedimensions the publisher specifies for the “<body>” element of a HTML orXHTML formatted content document also specifies the dimensions of thelayout viewport for the content document. For example, the following CSSdeclaration specifies dimensions for the “<body>” element at 792 pixelswide and 612 pixels high. This example CSS declaration may be includedin or referenced by each content document of the fixed electronicpublication to specify the dimensions of the layout viewport at 792pixels wide and 612 pixels high for that content document.

1: body { 2: width: 792px; 3: height: 612px; 4: }

While the aspect ratio and the dimensions of the layout viewport for acontent document may be specified separately within an electronicpublication as in the examples above. In other embodiments, the samemetadata specifies both the aspect ratio and the dimensions. Forexample, in some embodiments, the HTML or XHTML “<meta>” tag may be usedto specify both the aspect ratio and the dimensions. For example, thevalue of the “content” attribute of the “<meta”> viewport element couldrepresent both the aspect ratio and the width and height of the layoutviewport. As another example, in other embodiments, the dimensionsspecified for the HTML or XHMTL “<body>” element are used to specifyboth the aspect ratio and the dimensions of the layout viewport. Wherethe aspect ratio and the dimensions of the layout viewport are specifiedseparately for a content document, typically the aspect ratio of thespecified dimensions of the layout viewport is equal or substantiallyequal to the specified aspect ratio of the layout viewport.

Content Document Examples

As mentioned above, in some embodiments, a content document of anelectronic publication is treated by an e-reader device as a fixedlayout page. In addition, the content document may be authored by thepublisher to precisely position visual content of the content documentat fixed positions on the fixed layout page. To do so, the publisher mayuse the layout viewport as a positioning reference.

In some embodiments, each content document is HTML or XHTML formattedand CSS is used to precisely position visual content. The CSS may beincluded within the content document. Alternatively, the contentdocument may reference the CSS stored in another file. In both cases,the CSS is considered to be part of the content document.

The following is an example of XHTML formatted content document. In thisexample the aspect ratio of the layout viewport is specified at line 5.The dimensions of the layout viewport are specified in a separate CSSreferenced at line 8. The visual content assigned to the fixed layoutpage includes an image (line 12) and text (lines 13 and 14). Astylesheet for precisely positioning the visual content on the layoutviewport is referenced at line 8.

  1: <?xml version=“1.0” encoding=“UTF-8”?>   2: <!DOCTYPE html PUBLIC“-//W3C//DTD XHTML 1.1//EN”“http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd”>   3: <htmlxmlns=“http://www.w3.org/1999/xhtml”>   4:    <head>   5:    <metaname=“viewport” content=“width=792,    height=612” />   6:    <metacontent=“text/html; charset=UTF-8”/>   7:    <title>Fixed LayoutExample</title>   8:    <link href=“css/stylesheet.css” type=“text/css”   rel=“stylesheet”/>   9:    </head>   10:    <body>   11:       <divclass=“page001”>   12:          <img src=“images/page001.jpg”         alt=“alternating images of waves”/>   13:          <h1>Lorem<br/>Ipsum</h1>   14:           <h2>ConsecteturAdipiscing Elit</h2>   15:       </div>   16:    </body>   17: </html>

The following shows relevant portions of the stylesheet referenced atline 8 of the example content document above. In this example, the bodyof the fixed layout page is specified to have dimensions with an aspectratio that is the same as the specified aspect ratio of layout viewportat line 5 above. The top-left corner of the image is positionedabsolutely at 100 pixels from the top border of the layout viewport and100 pixels from the left border of the layout viewport. The text startsat 400 pixels from the top border of the layout viewport and 200 pixelsfrom the left border of the layout viewport.

1:  body { 2:     width: 792px; 3:     height: 612px; 4:     margin: 0;5:  } 6:  img { 7:     position: absolute; 8:     top: 100px; 9:    left: 100px; 10: } 12: h1, h2 { 13:    position: relative; 14:   padding: 0; 15:    top: 400px; 16:    left: 200px; 17: }

Examples will now be described that illustrate how a publisher may useHTML/XHTML and CSS to precisely position visual content of contentdocument on a fixed layout page using the layout viewport as apositioning reference.

Positioning Text on a Fixed Layout Page:

In some embodiments, text is precisely positioned on a fixed layout pageby positioning the text at an absolute position on the layout viewportrelative to the position of the <body> element on the layout viewport asin the above-example XHTML formatted content document and associated CSSinstructions. In the above example, since the body element is specifiedwith a margin of 0 and the h1 and h2 text elements are specified with apadding of 0, the text starts at 400 pixels from the top border of thelayout viewport and 200 pixels from the left border of the layoutviewport.

Positioning an Image on a Fixed Layout Page:

In some embodiments, an image is precisely positioned on a fixed layoutpage using the “position:absolute” CSS instruction. The image is thenpositioned on the layout viewport with pixel offsets. For example, the“top” and “left” CSS properties may be used to set the top left cornerof the image on the layout viewport. In the following example, thetop-left corner of the image is positioned absolutely at 100 pixels fromthe top border of the layout viewport and 100 pixels from the leftborder of the layout viewport.

1:  img { 2:     position: absolute; 3:     top: 100px; 4:     left:100px; 5:  }

Filing a Fixed Layout Page with an Image:

In some embodiments, to fill a fixed layout page with an image, thepublisher creates an image having the same pixel dimensions as thespecified dimensions of the layout viewport. The publisher then uses CSSinstructions to position the top-left corner of the image at thetop-left corner of the layout viewport. For example, consider a layoutviewport having the dimensions 792 pixels wide and 612 pixels high, thefollowing CSS instructions may be used to force an image of the samesize to fill the page:

1:  img { 2:     position: absolute 3:     height: 612px; 4:  }

Layering Text on an Image:

In some embodiments, the “z-index” CSS instruction is used by thepublisher to insure that an image positioned on a fixed layout pagestays behind text layered on top of the image. For example, for textwith a default z-index value of 0, the following CSS instructions insurethat the image will be displayed behind the text:

1:  img { 2:     position: absolute 3:     height: 612px; 4:    z-index: −1; 5:  }

Spanning an Image Over a Two-Page Spread:

In some embodiments, a fixed layout page may be created in which asingle image appears to span a two-page spread.

In some embodiments, this may be accomplished as follows: the publishercreates two content documents: one for a single page fixed layout pagefor the left-side of the two-page spread and one for a single page fixedlayout page for the right-side of the two-page spread. The publishersizes the image so that the image is the same height as the layoutviewports for the two content documents (which should be the same orapproximately the same size) but twice as wide. The publisher authorsthe left-side content document to display the left-half of the image andauthors the right-side content document to display the right half of theimage. Specifically, the left-side content document is authored toposition the top-left corner of a first copy of the image in thetop-left corner of the layout viewport for the left-side contentdocument and the right-side content document is authored to position thetop-right corner of a second copy of the image in the top-right cornerof the layout viewport for the right-side content document. The CSS“overflow” property with a value of “hidden” may be used to hide theright-half of the left single page fixed layout page image and theleft-half of the right single page fixed layout page image. The resultis a two-page spread in which a single image appears to span both fixedlayout pages.

In other embodiments, a two-page spread fixed layout page may be createdin which a single image appears to span a two-page spread by authoring asingle content document and sizing the image to be the same as the sizeof the layout viewport for the content document. When the contentdocument is displayed a two-page spread fixed layout page, the imagewill appear to span the two-page spread.

These two-page spread spanning techniques may be useful for an“illustrated” or “picture” book in which facing pages are intended bythe publisher to be viewed together.

Embedding Fonts

In some embodiments, for a fixed layout page, the e-reader device maynot allow the reader to change the font or font size of text displayedon the fixed layout page to preserve the font and font size choices ofthe publisher. Thus, a publisher, when creating a fixed layout page, maychoose fonts and font sizes for text displayed on fixed layout page tothe publisher's liking.

Typically, an e-reader device will have pre-installed a set of commonfonts. This means that data for rendering these common fonts is providedby the e-reader device (e.g., as part of the operating system 114) anddoes not need to be included in the fixed layout publication itself. Touse one of these common fonts in a fixed layout publication, thepublisher simply references the font by name in content documents of thepublication.

However, in some cases, a publisher may wish to use a font for whichfont rendering data is not pre-installed on the e-reader device. In someembodiments, a publisher can embed a custom font in a fixed layoutpublication and apply the embedded font to text of the publication. Todo so, the publisher includes a font file for the font in the electronicpublication, declares the name of the font and the location of the fontfile in a content document, and applies the font to text according tothe declaration.

In some embodiments, the font file may be any OpenType (OFT) or TrueType(TTF) font file. However, embodiments are not limited to any particulartype of font file. In some embodiments, the font name and font filelocation is declared using the CSS “@font-face” rule and the embeddedfont is applied to text by referencing the font by the declared name.

Sample Rendering Operation

With the above discussion in mind, a sample rendering operation ofdevice 100 with reference to FIG. 3 will now be described. In theexample below, the operation is described as being performed by device100. The device 100 may comprise one or more logic elements forperforming the operation. The logical elements may be implementedentirely in software, entirely in hardware, or a combination of softwareand hardware. In one particular embodiment, the operation is performedby the application 112 of device 100 in cooperation with the operatingsystem 114 of device 100.

Initially, the device 100 obtains (block 301) an electronic publicationcomprising one or more content documents. The device 100 may obtain theelectronic publication in a number of different ways and embodiments ofthe invention are not limited to any particular manner of obtaining theelectronic publication. In one embodiment, the device 100 obtains theelectronic publication from a remote resource such as a web server overa data network such as the Internet. For example, the device 100 mayobtain the electronic publication after a reader has purchased anddownloaded the electronic publication from an online bookstore. Asanother example, the device 100 may obtain the electronic publicationfrom a removable data storage device operatively coupled to the device100.

In some embodiments, the obtained electronic publication is a filearchive. For example, the electronic publication may be a .ZIP file orother file archive file type. In response to obtaining the electronicpublication, the device 100 extracts the electronic publication to astorage 106. As a result, the content documents and any configurationfiles of the electronic publication are laid out on the storage 106,arranged in a file system hierarchy such as the file system hierarchy ofFIG. 2 where each file including each content document of the electronicpublication is individually accessible to the device 100.

In other embodiments, the electronic publication is obtained as a seriesor collection of files which are stored by the device 100 on a storage106 and arranged by the device 100 in a file system hierarchy such asthe file system hierarchy of FIG. 2 where each file including eachcontent document of the electronic publication is individuallyaccessible to the device 100.

In some embodiments, after obtaining the electronic publication, thedevice 100 determines how to treat the electronic publication (i.e.,fixed layout or re-flowable) and other configuration options. Forexample, the device 100 may read and parse the display-options.xmlconfiguration file or other configuration file of the publication todetermine whether the electronic publication is to be treated as a fixedlayout publication or a re-flowable publication, whether the screenorientation is to be locked or not, or whether the publication isinitially to be opened to a single-page spread or a two-page spread. Therest of this example assumes that the electronic publication is to betreated as a fixed layout electronic publication.

In some embodiments, determining that the electronic publication is tobe treated as a fixed layout electronic publication means one or both ofthe following:

(1) for each content document of the electronic publication, the device100 will determine whether the content document is to be treated as (a)a fixed layout page or (b) a re-flowable document;

(2) at least when fixed layout pages are displayed, the device 100disables the ability of the reader to change the font or font size ofdisplayed text.

As mentioned, in some embodiments, a content document of a fixed layoutpublication may be rendered as a fixed layout page or a re-flowabledocument. Before rendering the content document, the device 100determines (block 303) whether the content document is to be treated asfixed layout page or a re-flowable document. Before this determination,the device 100 obtains (block 302) the content document in response to arendering event. The rendering event may be any event within the device100 which causes the content document to be rendered. Typically, but notalways, the rendering event is triggered by an input from a reader(user) of the device 100 Non-limiting examples of a rendering eventwhich may cause the device 100 to obtain the content document includethe reader opening the electronic publication, the reader turning a pageof the publication, the reader causing the orientation of the screen tochange from landscape to portrait or from portrait to landscape by, forexample, changing the physical orientation of the device 100 display116, and the reader causing the display of the publication to switchfrom a single-page spread to a two-page spread or from a two-page spreadto a single-page spread by, for example, adjusting a configurationoperation accessible via a graphical user interface.

After obtaining the content document, the device 100 determines (block303) whether the content document is to be treated as (a) a fixed layoutpage or (b) a re-flowable document. This determination may be made basedon explicit configuration, may be inferred by the device 100, or basedon a combination of explicit configuration and inference. For example,configuration data associated with the content document, either in aconfiguration file or within the content document itself, may indicatehow the content document is to be treated. Alternatively, the device 100may infer how the content document is to be treated from metadataassociated with the content document. For example, the device 100 maydetermine that the content document is to be treated as a fixed layoutpage by the presence of the “<meta>” viewport element in the contentdocument. Conversely, the device 100 may determine that the contentdocument is to be treated as a re-flowable document in the absence ofthe “<meta>” viewport element in the content document.

In some embodiments, where the device 100 determines that the contentdocument is to be treated as a fixed layout page, the device 100additionally determines whether the content document is to be treated asa single page fixed layout page or a two-page spread fixed layout page.Again, this determination can be made based on explicit configurationassociated with the content document, inferred from the content documentitself, or combination of configuration and inference.

If the content document is to be treated as a fixed layout page, thenthe content document is rendered as a fixed layout page displayed (block305) entirely on the screen of the display 116. In particular, if thecontent document is to be treated as a single page fixed layout page,then the content document is rendered as a single page fixed layout pagedisplayed (block 305) entirely on the screen of the display 116. On theother hand, if the content document is to be treated as a two-pagespread fixed layout page, then the content document is rendered as atwo-page spread fixed layout page displayed (block 305) entirely on thescreen of the display 116.

When a content document is rendered as a fixed layout page, the visualcontent of the content document is displayed (block 306) on the fixedlayout page and the device 100 does not allow (block 307) the visualcontent of the content document to re-flow to another page.

When displaying (block 305) the fixed layout page, the fixed layout pagemay be scaled by the scaling mechanism of the device 100 to fit thecurrent size of the display 116 screen. Further, when displaying (block306) the visual content of the content document on the fixed layoutpage, the visual content may be repositioned and resized by the scalingmechanism of the device 100 to fit the scaled fixed layout page size. Anexample scaling operation is described below with respect to FIG. 4.

On the other hand, if the content document is to be treated as are-flowable document, then some or all of the visual content of thecontent document is displayed (block 308) on a page and the device 100allows (block 309) the visual content of the content document to re-flowbetween pages.

While the steps of flowchart 300 are described and presented in acertain order, in other embodiments, the steps may be performed in anorder that is different from the order shown and described and somesteps may be performed in parallel.

Sample Scaling Operation

As mentioned above with reference to FIG. 3, when displaying (block 305)the fixed layout page corresponding to a content document, the fixedlayout page may be scaled by the scaling mechanism of the device 100 tofit the current size of the display 116 screen. Further, the visualcontent of the content document may be repositioned and resized by thescaling mechanism to fit the scaled fixed layout page size. A samplescaling operation of device 100 with reference to FIG. 4 will now bedescribed. In the example below, the scaling operation is described asbeing performed by device 100. The device 100 may comprise one or morelogic elements for performing the scaling operation. The logicalelements may be implemented entirely in software, entirely in hardware,or a combination of software and hardware. In one particular embodiment,the scaling operation is performed by the application 112 of device 100in cooperation with the operating system 114 of device 100.

In the example scaling operation below, it is assumed that the layoutviewport of the content document is larger in at least one dimensionthan the current size of the screen of display 116, and thus, that thefixed layout page must be scaled down to fit the current size of thescreen. However, it will be apparent to one skilled in the art that asimilar scaling operation could be performed to scale page up to fit thesize of the screen. Further, in other embodiments, the device 100 maynot scale the fixed layout page in response to a rendering event if, forexample, the size of the layout viewport is such that the fixed layoutpage can fit entirely on the screen without scaling.

Turning now to the flowchart 400 of FIG. 4, the chart 400 depicts stepsof the scaling down process according to an embodiment of the invention.The device 100 performs the steps for a content document of anelectronic publication after determining the content document is to betreated as a fixed layout page. For example, the device 100 may performthe steps of chart 400 in the context of steps 305 and 306 of chart 300of FIG. 3. The content document includes or references one or morevisual content elements assigned to the fixed layout page by thepublisher. A visual content element may be text or an image, forexample.

At step 401, the device 100 obtains the aspect ratio and dimensions ofthe layout viewport for the content document. In some embodiments, theaspect ratio is obtained from the “<meta>” viewport element of thecontent document. In some embodiments, the dimensions (e.g., width andheight in pixels) of the layout viewport are obtained from a stylesheetincluded or referenced by the content document. In particular, thedimensions of layout viewport may be obtained from the declareddimensions in the stylesheet for the HTML/XHTML “<body>” element. Insome embodiments, both the aspect ratio and dimensions of the layoutviewport are obtained from “<meta>” viewport element of the contentdocument. In some embodiments, both are obtained from a stylesheetincluded or referenced by the content document. In some embodiments, theaspect ratio is obtained from a stylesheet included or referenced by thecontent document and the dimensions are obtained from the “<meta>”viewport element of the content document.

At step 402, the device 100 obtains data reflecting the current size ofthe screen of the display 116. The data indicates the current width ofthe screen in pixels and the current height of the screen in pixels. Thecurrent width and height of the screen may vary depending on the currentorientation of the screen. In particular, if the screen is currently inlandscape orientation when the data is obtained, then the current widthof the screen will be larger than the current height. On the other hand,if the screen is currently in portrait orientation, then the currentheight will be larger than the current width. In some embodiments, thedata reflecting the current size of the screen of display 116 isobtained from operating system 114. The operating system 114 providesthe data as a return or output value from a function, sub-routine orApplication Programming Interface (API) dedicated to providinginformation about the display 116 and the current state of the screen ondisplay 116.

At step 403, the device 100 selects an initial size for a firstdimension of the fixed layout page. The first dimension is either widthor height. The initial size is selected such that the entire fixedlayout page can be displayed on the screen of the display 116. Further,the initial size is selected so that the fixed layout page has an aspectratio identical to or substantially identical to the aspect ratio of thelayout viewport.

In some embodiments, width is selected as the first dimension if thelayout viewport aspect ratio is larger than the screen aspect ratio. Inother embodiments, height is selected as the first dimension if thelayout viewport aspect ratio is smaller than the screen aspect ratio.For example, if the layout viewport are 1000 pixels wide by 1400 pixelshigh and the current size of the display screen is 768 pixels wide by1024 pixels high, then height is selected as the first dimension.

Once the first dimension is selected, the device 100 selects (block 403)the initial size for the fixed layout page page in the first dimension.In some embodiments, the device 100 selects an initial size equal to orsubstantially equal to the size of the screen in the first dimension.Returning the example in the previous paragraph, if height is selectedas the first dimension, then, according to some embodiments, the device100 would select an initial size for the height of the fixed layout pageof 1024 pixels.

Once the initial size for the first dimension of the fixed layout pageis selected, the initial size for the other dimension is calculated bythe device 100 so that the fixed layout page maintains or substantiallymaintains the layout viewport aspect ratio. If the first dimension isheight, then the initial size for the width of the fixed layout page canbe calculated by multiplying the layout viewport aspect ratio by thecurrent width of the screen. If the first dimension is width, then theinitial size for the height of the fixed layout page can be calculatedby dividing the current height of the screen by the layout viewportaspect ratio. Returning again to the previous example, since height wasselected as the first dimension, the initial width of the fixed layoutpage would be approximately 731 or 732 pixels (1024 pixels*(1000pixels/1400 pixels) depending on rounding.

In some embodiments, the fixed layout page does not completely fill theavailable screen real estate and some area around the border of thefixed layout page is used for other visual elements such as toolbars,fake book binding and pages, a small slice of the facing page, etc. Atstep 404, the device 100 adjusts the initial size of the fixed layoutpage to make room on the screen for the other border elements thatconsume screen real estate. The device 100 adjusts the initial fixedlayout page size so that the layout viewport aspect ratio is maintainedor substantially maintained. The result of the adjustment is a finalfixed layout page size that is smaller than the initial fixed layoutpage size but that has the same or the substantially same aspect ratioas the initial fixed layout page size.

In some embodiments, the adjustment (block 404) involves the device 100determining a size for the top, bottom, left and right borders. Theborder sizes may vary depending on what visual elements are displayed inthe border areas surrounding the fixed layout page and the sizes ofthose elements. For example, the top border area may display a toolbaror other graphical user interface controls. If the fixed layout page isa right-facing page of the publication being displayed in a single-pagespread, then the left border of the screen may, for example, contain asmall vertical slice of the left-facing page, a fake binding, etc. andthe right border may contain fake pages that appear stacked underneaththe fixed layout page as would appear to the reader if reading an actualphysical book or magazine. Similarly, if the fixed layout page is aleft-facing page, the right border of the screen may, for examplecontain a slice of the right-facing page, a fake binding, etc. and theleft border of the screen may contain fake pages. In either asingle-page or two-page spread, one or more of the borders of the screenmay have room for a fake cover. Once the sizes of the borders have beendetermined, the device 100 adjusts the initial fixed layout page size toproduce the final fixed layout page size. The device 100 adjusts theinitial fixed layout page size maintaining or substantially maintainingthe aspect ratio of the layout viewport while at the same time makingroom for the border elements.

As an example, a content document with a layout viewport size of 1000pixels wide and 1400 pixels high being rendered as a single page fixedlayout page on a screen 768 pixels wide and 1024 pixels high may have aninitial fixed layout page size of 731 pixels wide by 1024 pixels high.The initial fixed layout page size may be adjusted down to a final fixedlayout page size of 686 pixels wide and 968 pixels high to make room onthe screen for border elements. Note that the aspect ratios of thelayout viewport, the initial fixed layout page, and the final fixedlayout page are the same or substantially similar.

As another example, a content document with the same layout viewportsize being rendered on a screen in landscape orientation as a singlepage fixed layout page as part of a two-page spread may have an initialfixed layout page size of 548 pixels wide by 768 pixels high (anothercontent document is also rendered as another single page fixed layoutpage representing the facing page of the two-page spread). The initialfixed layout page size may be adjusted down to a final fixed layout pagesize of 500 pixels wide and 711 pixels high to make room on the screenfor border elements. Again, the aspect ratios of the layout viewport,the initial fixed layout page, and the final fixed layout page are thesame or substantially similar.

At step 405, a width-wise scaling factor and a height-wise scalingfactor are determined by the device 100 based on the layout viewportdimensions and the final fixed layout page size. These scaling factorsare used by the device 100 to reposition and resize visual elementsassigned to the fixed layout page to fit the final fixed layout pagesize. The visual elements are repositioned and resized by the device 100retaining the fixed layout specified the publisher. The width-wisescaling factor and the height-wise scaling factor represent thepercentage positions and sizes of visual elements should be adjustedwidth-wise and height-wise to fit the final fixed layout page size. Thewidth-wise scaling factor may be determined by dividing the width of thefinal fixed layout page by the specified width of the layout viewport.The height-wise scaling factor may determined by dividing the height ofthe final fixed layout page by the height of the layout viewport. As anexample, if the layout viewport size is 1000 pixels wide by 1400 pixelshigh and the final fixed layout page size is 500 pixels wide and 711pixels high, then the width-wise scaling factor is 50% and theheight-wise scaling factor is approximately 51%.

At step 406, the position and size of visual content elements assignedto the fixed layout page by the publisher are scaled down by the device100 to fit the final fixed layout page size based on the width-wisescaling factor and the height-wise scaling factor. This scaling down mayoccur as the device 100 is rendering the visual content elements on thefinal fixed layout page. For example, the device 100 may read and parsethe content document as a stream of bytes, as the device 100 encountersa sequence of bytes representing a visual content element to be renderedon the fixed layout page, the device 100 may perform the scaling down.

In some embodiments, for a visual content element that is preciselypositioned on the layout viewport by the publisher, that position isscaled down by the device 100 to fit the final fixed layout page size.For example, if a text block or image is positioned by the publisher tobegin at 100 pixels from the left border and 400 pixels down from thetop border of a layout viewport 1000 pixels wide and 1400 pixels high,then the position to begin rendering the text block on a final fixedlayout page 500 pixels wide and 711 pixels high is 50 pixels(500/100*100) from the left border of the final fixed layout page and203 pixels (711/1400*400) from the top border of the final fixed layoutpage.

In some embodiments, the size (width and height) of an image is alsoscaled down based on the width-wise scaling factor and a height-wisescaling factor. For example, an image 1000 pixels wide and 1400 pixelshigh positioned on a layout viewport 2000 pixels wide and 2800 pixelshigh would, when presented on a final fixed layout page size of 500pixels wide and 711 pixels high, be scaled down to 250 pixels wide(500/2000*1000) and 355 pixels high (711/2800*1400). Note that the imageas scaled down to fit the final fixed layout page size consumes roughlythe same percentage area of the final fixed layout page as the originalimage size consumed of the layout viewport.

In some embodiments, font glyphs for text to be displayed on the fixedlayout page are not rasterized until the font glyphs are ready to bedrawn on the fixed layout page. The pixels to be drawn are determinedusing the vector paths for the glyph font. Rasterized glyphs are scaledbased on the width-wise and/or height-wise scaling factors.

While the steps of flowchart 400 are described and presented in acertain order, in other embodiments, the steps may be performed in anorder that is different from the order shown and described and somesteps may be performed in parallel.

Visual Effects with Page Images

In some embodiments, the device 100 generates digital images of renderedfixed layout pages of a fixed layout publication. The digital images areused to provide three different visual effects. In one effect, the tableof contents of a fixed layout publication provides, in addition to anytextual information, a thumbnail image of each fixed layout pagereferenced in the table of contents. In a second effect, when a readerprovides input to turn a fixed layout page of the publication, therendered fixed layout page is replaced with a generated digital image ofthe fixed layout page and an animated visual curling effect is appliedto the image so that the fixed layout page appears to turn as if a realphysical paper page. In a third effect, thumbnail images of fixed layoutpages are provided as the reader provides input to a “scrubber”graphical user interface component of the device 100.

Generating the Digital Images

In some embodiments, the device 100 generates a digital image for afixed layout page by rendering the fixed layout page to a virtual screenbuffer and capturing an image of the fixed layout page from the screenbuffer as an image file such as, for example, a JPEG or PNP image file.The image file may be stored on a storage 106 of the device 100. In someembodiments, to generate a digital image for a fixed layout page, thedevice 100 instantiates a virtual screen buffer having a virtual screensize corresponding to the size of the layout viewport. The device 100renders the fixed layout page to the screen buffer to fill the virtualscreen and captures the image from the screen buffer. For example, alayout viewport 1000 pixels wide by 1400 pixels high would generate animage 1000 pixels by 1400 pixels.

Scaled down versions of the image captured from the virtual screenbuffer may also be generated and stored as image files. For example, thedevice 100 may generate a thumbnail version of a captured screen bufferimage for the table of contents visual effect and/or the scrubber visualeffect. The device 100 may generate two scaled down versions of acaptured screen buffer image for the page turning effect: one for thecorresponding fixed layout page when displayed in a single-page spreadand the other for the corresponding fixed layout page when displayed ina two-page spread.

The device 100 may generate the screen buffer image and the thumbnailand scaled down images at times that minimize the impact on renderingthe publication on the display 116. For example, screen buffer imagesand thumbnail images may be generated for only the fixed layout pagesreferenced in the table of contents. Thereafter, screen buffer images,thumbnail images, and scaled down images may be generated for the otherpages just-in-time as the reader views a fixed layout page or previews afixed layout page with the scrubber. Further, once generated, thegenerated image files may be cached on a storage 106 to avoid repeatedlygenerating the same image file.

Techniques known in the art may be used to capture an image from avirtual screen buffer and to scale the captured screen buffer image downto thumbnail size or other size.

In the foregoing description, embodiments of the present invention havebeen described with reference to numerous specific details that may varyfrom implementation to implementation. Thus, the sole and exclusiveindicator of what is the invention, and is intended by the Applicants tobe the invention, is the set of claims that issue from this application,in the specific form in which such claims issue, including anysubsequent correction. Any definitions expressly set forth herein forterms contained in such claims shall govern the meaning of such terms asused in the claims. Hence, no limitation, element, property, feature,advantage or attribute that is not expressly recited in a claim shouldlimit the scope of such claim in any way. The specification and drawingsare, accordingly, to be regarded in an illustrative rather than arestrictive sense.

1. A method for rendering a content document of an electronic publication in a fixed layout, the method comprising: obtaining an electronic publication comprising a content document, the content document including or referencing at least one visual content element; determining whether the content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document; in response to determining that the content document is to be treated as a fixed layout page: displaying the fixed layout page entirely on a display screen, displaying the at least one visual content element on the fixed layout page, and not allowing the at least one visual content element to re-flow to another page; wherein the method is performed by a computing device.
 2. The method of claim 1, wherein determining whether the content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document comprises: determining whether the content document is to be treated as one of: (a) a single page fixed layout page or (b) a re-flowable document.
 3. The method of claim 1, wherein determining whether the content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document comprises: determining whether the content document is to be treated as one of: (a) a single page fixed layout page, (b) a two-page spread fixed layout page, or (c) a re-flowable document.
 4. The method of claim 1, wherein determining whether the content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document comprises: obtaining data associated with or contained in the content document that indicates how the content document is to be treated; and based on the obtained data, determining whether the content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document.
 5. The method of claim 4, wherein the data is a HTML or XHTML meta element contained in the content document.
 6. The method of claim 1, wherein determining whether the content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document comprises: determining whether the content document contains a particularly named HTML or XHTML meta element; and determining that the content document is to be treated as a fixed layout page based on the presence of the particularly named meta element in the content document.
 7. The method of claim 1, wherein the fixed layout page is a single page displayed entirely on the display screen.
 8. The method of claim 1, wherein the fixed layout page is a two-page spread displayed entirely on the display screen.
 9. The method of claim 1, wherein the content document is an HTML or XHTML formatted document.
 10. The method of claim 1, wherein the at least one visual content element is a text element.
 11. The method of claim 1, wherein the at least one visual content element is an image element.
 12. The method of claim 1, wherein the electronic publication comprises another content document, the other content document including or referencing one or more visual content elements, the method further comprising: determining whether the other content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document; in response to determining that the other content document is to be treated as a re-flowable document, displaying a re-flowable page, displaying at least one of the one or more visual content elements of the other content document on the re-flowable page, and allowing the at least one visual content element displayed on the re-flowable page to re-flow to another page.
 13. A method for rendering a content document of an electronic publication in a fixed layout, the method comprising: obtaining an electronic publication comprising a HTML or XHTML formatted content document, the content document including or referencing at least one visual content element; in response to determining that the content document is to be treated as a fixed layout page: displaying the fixed layout page entirely on a display screen, displaying the at least one visual content element on the fixed layout page, and not allowing the at least one visual content element to re-flow to another page; wherein the method is performed by a computing device.
 14. A computing device comprising: one or more processors; one or more computer-readable media storing instructions which, when executed by the one or more processors, causes the computing device to perform: obtaining an electronic publication comprising a content document, the content document including or referencing at least one visual content element; determining whether the content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document; in response to determining that the content document is to be treated as a fixed layout page: displaying the fixed layout page entirely on a display screen, displaying the at least one visual content element on the fixed layout page, and not allowing the at least one visual content element to re-flow to another page.
 15. The computing device of claim 14, wherein determining whether the content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document comprises: determining whether the content document is to be treated as one of: (a) a single page fixed layout page or (b) a re-flowable document.
 16. The computing device of claim 14, wherein determining whether the content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document comprises: determining whether the content document is to be treated as one of: (a) a single page fixed layout page, (b) a two-page spread fixed layout page, or (c) a re-flowable document.
 17. The computing device of claim 14, wherein determining whether the content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document comprises: obtaining data associated with or contained in the content document that indicates how the content document is to be treated; and based on the obtained data, determining whether the content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document.
 18. The computing device of claim 17, wherein the data is a HTML or XHTML meta element contained in the content document.
 19. The computing device of claim 14, wherein determining whether the content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document comprises: determining whether the content document contains a particularly named HTML or XHTML meta element; and determining that the content document is to be treated as a fixed layout page based on the presence of the particularly named meta element in the content document.
 20. The computing device of claim 14, wherein the fixed layout page is a single page displayed entirely on the display screen.
 21. The computing device of claim 14, wherein the fixed layout page is a two-page spread displayed entirely on the display screen.
 22. The computing device of claim 14, wherein the content document is an HTML or XHTML formatted document.
 23. The computing device of claim 14, wherein the at least one visual content element is a text element.
 24. The computing device of claim 14, wherein the at least one visual content element is an image element.
 25. The computing device of claim 14, wherein the electronic publication comprises another content document, the other content document including or referencing one or more visual content elements, the one or more computer-readable media storing instructions which, when executed by the one or more processors, causes the computing device to further perform: determining whether the other content document is to be treated as one of: (a) a fixed layout page or (b) a re-flowable document; in response to determining that the other content document is to be treated as a re-flowable document, displaying a re-flowable page, displaying at least one of the one or more visual content elements of the other content document on the re-flowable page, and allowing the at least one visual content element displayed on the re-flowable page to re-flow to another page.
 26. A computing device comprising: one or more processors; one or more computer-readable media storing instructions which, when executed by the one or more processors, causes the computing device to perform: obtaining an electronic publication comprising a HTML or XHTML formatted content document, the content document including or referencing at least one visual content element; in response to determining that the content document is to be treated as a fixed layout page: displaying the fixed layout page entirely on a display screen, displaying the at least one visual content element on the fixed layout page, and not allowing the at least one visual content element to re-flow to another page. 